package com.app.manage.moudles.server.service;

import com.app.manage.moudles.server.po.ServerNodePo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.app.manage.moudles.server.entity.TServer;

import java.util.List;

/**
 * 服务器-目前仅支持账号/密码登录(TServer)表服务接口
 *
 * @author makejava
 * @since 2025-05-16 11:16:19
 */
public interface TServerService extends IService<TServer> {

    /**
     * 分页查询
     * @param pageNum
     * @param pageSize
     * @param tServer
     * @return
     */
    Page<TServer>  pageData(Integer pageNum,Integer pageSize,TServer tServer);

    /**
     *
     * @param tServer
     * @return
     */
    String saveData(TServer tServer);

    /**
     * 检查ssh连接
     * @param tServer
     * @return
     */
    String checkSshConnect(TServer tServer);

    /**
     * 批量删除
     * @param idList
     * @param <T>
     * @return
     */
    <T>String removeIds(List<T> idList);

    /**
     * 检测并修改服务器状态
     * @return
     */
    Integer checkAndUpdStatus();


    List<ServerNodePo> listNodePo(Integer serverId,String prePath,String allPath);

}

